﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using System.ServiceModel;
using System.Data.Entity;
using WCFThree.Entity;

namespace WCFThree.Abstract
{
    /// <summary>
    /// 学生表，数据访问
    /// </summary>
    [ServiceContract]
    public interface IStudent
    {
        /// <summary>
        /// 获取表达式树
        /// </summary>
        /// <returns></returns>
        DbSet<student> GetDbSet();

        /// <summary>
        /// 获取列表
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<student> GetList();
        /// <summary>
        /// 获取对象
        /// </summary>
        /// <param name="sno">学生编号</param>
        /// <returns></returns>
        [OperationContract]
        student GetModel(string  sno);
        /// <summary>
        /// 获取对象及关联数据
        /// </summary>
        /// <param name="sno">学生编号</param>
        /// <returns></returns>
        [OperationContract]
        student GetModel_Related(string sno);
        /// <summary>
        /// 添加对象
        /// </summary>
        /// <param name="model">学生对象</param>
        /// <returns></returns>
        [OperationContract]
        bool Add(student model);
    }
}
